package com.rays.sysmech.ui;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.Border;

import com.rays.sysmech.constants.StringConstants;

public class OptionsDialog extends JDialog 
{
	public OptionsDialog(Frame owner,boolean modal)
	{
		super(owner, modal);
		this.initializeDialog();
		
		JPanel jPanel = new JPanel(new BorderLayout());
		Border padding = BorderFactory.createEmptyBorder(10, 20, 5, 20);
		jPanel.setBorder(padding);
		
		JComboBox combox = new JComboBox(StringConstants.supportedFileTypes);
		combox.setBorder(BorderFactory.createEmptyBorder(10, 20, 5, 20));
		combox.setEditable(true);
		combox.setPreferredSize(new Dimension(100, 40));
		jPanel.add(combox, BorderLayout.PAGE_START);
		
		JButton okBtn = new JButton("OK");
		okBtn.addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent arg0) {
				// TODO Auto-generated method stub
				
			}
		});
		jPanel.add(okBtn, BorderLayout.PAGE_END);
		this.add(jPanel);
		this.pack();
	}
	
	private void initializeDialog()
	{
		setTitle(StringConstants.optionDialogTitle);
		setResizable(true);
		setPreferredSize(new Dimension(300, 300));
		setIconImage(Toolkit.getDefaultToolkit().
				createImage(StringConstants.frameIconImage));
	}

}
